<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:composite="http://java.sun.com/jsf/composite"
	xmlns:p="http://primefaces.org/ui">

<ui:composition>
	
	<h:outputLink value="index.xhtml">
		<h:graphicImage name="img/logo3.png" width="400" height="100" style="float:left"/>
	</h:outputLink>

	<div id="nav">
		<h:outputLink rendered="#{loginBean.login.autenticado}" value="#">Minha Conta</h:outputLink>
		<h:outputLink rendered="#{!loginBean.login.autenticado}" value="register.xhtml">Registrar</h:outputLink>
		<h:outputLink value="carrinho.xhtml">Meu carrinho
			<h:outputText value="(R$ #{carrinhoBean.calculaSubtotal()})" style="font-size:15px"/>
		</h:outputLink>	
		<h:outputLink rendered="#{!loginBean.login.autenticado}" value="login.xhtml">Login</h:outputLink>
		<h:form style="display:inline;">
			<h:commandLink value="Logout" action="#{loginBean.logout}" rendered="#{loginBean.login.autenticado}" />
		</h:form><br/>
		<h:outputLabel rendered="#{loginBean.login.autenticado}" value="Bem-vindo (#{loginBean.login.usuario})" />
	</div>
	
	<div id="menu" style="clear:both ">
	<h:form>
		<p:menubar>
			<p:menuitem value="Home" icon="ui-icon-home" url="index.xhtml" />
			<p:menuitem value="Livros" icon="ui-icon-note" url="livros.xhtml" />
			<p:menuitem value="Vestuário" icon="ui-icon-star" url="vestuario.xhtml" />
			<p:menuitem value="Equipamento" icon="ui-icon-wrench" url="equipamento.xhtml"/>
			<p:menuitem value="Acessórios de acampamento" icon="ui-icon-pencil" url="acessorios.xhtml" />
			<p:menuitem value="Games" icon="ui-icon-smile" url="games.xhtml" />
		</p:menubar>
	</h:form>
	</div>
</ui:composition>

</html>